﻿import QtQuick 2.15
import QtQuick.Controls 2.15


Popup {
    width: 900
    height: 400
    closePolicy: Popup.NoAutoClose
    background: Rectangle{
        color: "gold"
        border.width: 5
        border.color: "#000000"


        Text{
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.top: parent.top
            anchors.topMargin: 100
            font.pixelSize: 70
            font.bold: true
            color: "red"
            text: "请确认是否复位刀盘胶辊！"
        }

    }

    Item{
        id:popupBack
        anchors.fill: parent
    }

    Rectangle{
        anchors.bottom: popupBack.bottom
        anchors.bottomMargin: 20
        anchors.horizontalCenter: popupBack.horizontalCenter
        width: 200
        height: 80
        color: "#2b6ec5"
        radius: 10

        Text{
            anchors.centerIn: parent
            font.pixelSize: 30
            font.bold: true
            color: "white"
            text: "确 认"
        }

        MouseArea{
            anchors.fill: parent

            onPressed: {
                parent.color = "#e44034"
                Cpp_Connect.write_modbus_tcp_OneHoldingRegisters("2007","2")
            }

            onReleased: {
                parent.color = "#2b6ec5"
                returnLocationFlag = false
                returnLocationPopup.close()
            }

        }


    }



}
